﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLLFactory;
using DataMode;
using IBLL;
using System.Data;
using System.Text;

namespace Face.Web.VideoPage
{
    public partial class AlbumInfoModify : System.Web.UI.Page
    {
        private static IBLL.IAlbum bll = BLLFactory.DataAccess.GetAlbum();

        DataModeDataContext ctx = new DataModeDataContext();

        video_album album = new video_album();

        protected void Page_Load(object sender, EventArgs e)
        {
            album.video_album_id = 3;

            album = bll.findAlbum(album.video_album_id);

            Label1.Text = album.album_name;
            Label2.Text = album.album_description;
        }

        protected void Button_Sumbition(object sender, EventArgs e)
        {

            album.album_description = albumDescription.Text;
            album.album_name = albumName.Text;

            Label1.Text = album.album_name;
            Label2.Text = album.album_description;
            albumDescription.Text = "";
            albumName.Text = "";

            bll.updateAlbum(album);


        }

        protected void btn_logout(object sender, EventArgs e)
        {
            Session.Remove("user");
            Response.Redirect("/login_and_signup/login.aspx");
        }
    }
}